﻿using System;
using System.Windows;
using System.Windows.Input;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Tasks;

namespace Starter3DGame
{
    public partial class AboutPage : PhoneApplicationPage
    {
        public AboutPage()
        {
            InitializeComponent();
        }

        private void VisitDBBlogButton_Click(object sender, RoutedEventArgs e)
        {
            NavigatetoWebPage(@"http://darkgenesis.zenithmoon.com/the-starter2d-and-starter3d-tutorials-now-on-the-marketplace/");
        }

        private void GotoCodeplexButton_Click(object sender, RoutedEventArgs e)
        {
            NavigatetoWebPage(@"http://starter3dxna.codeplex.com/");
        }

        private void ViewDDReaperButton_Click(object sender, RoutedEventArgs e)
        {
            NavigatetoWebPage(@"http://twitter.com/#!/SimonDarksideJ");
        }

        private void VisitZenithMoonButton_Click(object sender, RoutedEventArgs e)
        {
            NavigatetoWebPage(@"http://zenithmoon.com/");
        }
		
		private static void NavigatetoWebPage(string website)
        {
            WebBrowserTask wb = new WebBrowserTask();
            wb.Uri = new Uri(website, UriKind.Absolute);
            wb.Show();
        }

        private void Avatar_Image_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            NavigatetoWebPage(@"http://twitter.com/#!/SimonDarksideJ");
        }

        private void Logo_Image_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            NavigatetoWebPage(@"http://zenithmoon.com/");
        }
    }
}
